package com.fire.control.system.statics;

import com.fire.control.system.support.protocol.comman.ResponseProtocol;

/**
* @ClassName: Status_Response
* @Description: TODO(响应状态)
* @author wanbo
* @date 2017年6月9日 上午9:56:49
*/
public enum Message_Response {
	
	SUCCESS(200,"成功",true)
	,FAIL(400,"失败",false)
	,LOGIN_ERROR_USER_NULL(401,"用户名或密码错误",false);

	private String message;
	private int code;
	private boolean isSuccess;
	
	
	private Message_Response(int code,String message,boolean isSuccess) {
		this.message = message;
		this.code = code;
		this.isSuccess = isSuccess;
	}
	
	
	public boolean isSuccess() {
		return isSuccess;
	}



	public void setSuccess(boolean isSuccess) {
		this.isSuccess = isSuccess;
	}



	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	
	public void messageToProtocol(ResponseProtocol protocol){
		protocol.setCode(this.code);
		protocol.setIsSuccess(this.isSuccess);
		protocol.setMessage(this.message);
	}
	
}
